import request from '@/utils/request'

const dictManage = {
  // 字典明细管理
  // 获取字典管理模块列表
  getDictModuleList(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/queryPage',
      method: 'post',
      data
    })
  },
  // 删除字典，根据id(明细)
  deleteDictDetailById(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/dictManage.deleteDictDetailById',
      method: 'post',
      data
    })
  },
  // 批量删除（明细）
  batchDeleteDictDetail(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/batchDeleteDictDetail',
      method: 'post',
      data
    })
  },
  // 新增字典（明细）
  addDictDetail(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/addDictDetail',
      method: 'post',
      data
    })
  },
  // 修改字典（明细）
  updateDictDetail(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/updateDictDetail',
      method: 'post',
      data
    })
  },
  // 修改字典-开启关闭状态
  enableOrDisable(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/enableOrDisable',
      method: 'post',
      data
    })
  },
  // 树形字典管理
  // 删除字典
  deleteDictById(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/deleteById',
      method: 'post',
      data
    })
  },
  // 获取字典管理列表
  getDictList(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/queryPageDictDetail',
      method: 'post',
      data
    })
  },
  // 添加字典
  addDict(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/add',
      method: 'post',
      data
    })
  },
  // 编辑字典
  updateDict(data) {
    return request({
      url: '/energy-carbon/grass-core/dict/update',
      method: 'post',
      data
    })
  }
}

export default dictManage
